adTempus API
PreviousUpNext
IJobAgentJoin::Terminate Method

Terminates one or more instances of the job.

C++
HRESULT Terminate(long options, long instanceID);
C#
Terminate(long options, long instanceID);
Visual Basic
Sub Terminate(options As long, instanceID As long)
Parameters 
Description 
[in] long options 
Options that control termination. Use any combination of the TerminationOptionsEnum values. 
[in] long instanceID 
To terminate a specific instance, specify the instance ID (available from the ExecutionHistoryItem corresponding to the instance). 

You must have saExecute (yes, saExecute) permission for the job, or the method will fail with error ADT_E_NO_PERMISSION. 

To terminate all instances, set options to toTerminateAllInstances and set the instanceID to 0.

adTempus API Reference version 3.0.0.0, revised 10/30/2008